
#include "test.h"

Time::Time()
{
    hours = 0;
    minutes = 0;
}

Time::Time(int hour, int min)
{
    hours = hour;
    minutes = min;
}

Time::~Time() {}

void Time::show() const
{
    std::cout << "hours: " << hours << "  ";
    std::cout << "minutes: " << minutes << std::endl;
}

Time Time::operator+(const Time &t)
{
    Time temp;
    temp.minutes = minutes + t.minutes;
    temp.hours = hours + t.hours + temp.minutes / 60;
    temp.minutes %= 60;
    return temp;
}